#include "iterators.h"
#include "exceptions.h"
#include "inline_method.h"
#include "const_member.h"
#include "foo.h"

#include <iostream>


foo GlobalFooObject(GlobalTextBlockObject); // this will crashed because GlobalTextBlockObject is not initialized

struct NoCopyConstructor
{
    std::vector<int> vector_;
    int              value_;
};

int main()
{
//    example::inserting_using_const_iterator();

//    example::inserting();
//    example::erasing();
//    example::reverse_inserting();
//    example::reverse_erasing();

//    example::istream_iterator_using();
//    example::istreambuf_iterator_using();
//    inline_method im;  // undefined reference!
//    im.print();

    //------------------------
    NoCopyConstructor test1;
    for(int i = 5; i < 10; ++i)
        test1.vector_.push_back(i);
    test1.value_ = 7;

    NoCopyConstructor test2 = test1;
    //------------------------

    const TextBlock text("text");
    const auto& ch = text[0];

    TextBlock text1("text1");
    auto& ch1 = text1[0];
    ch1 = '0';

//    text[1] = 'x';
    text1.print();
    //------------------------

}

